<template>
	<view style="display: flex;flex-direction: column; align-items: center;">
		<image  :src="'http://localhost:8090'+data.icon" style="width: 100px; margin-top: 50px;" mode="widthFix"></image>
		<view  style="margin-top: 20px;">
			<view>姓名：{{data1.name}}</view>
				<view>邮箱：{{data1.email}}</view>
				<view>手机：{{data1.telephone}}</view>
				<view>学院：{{data1.department}}</view>
				<view>专业：{{data1.major}}</view>
			</view>
		</view>
	
</template>

<script>
	export default {
		data() {
			return {
				data:{
					icon:null
				},
				data1:[]
			}
		},
		methods: {
			
		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/freshmenapp/function/findone',
				method: 'POST',
				data: {
					id: 5
				},
				success: res => {
					this.data = res.data.data 
					console.log(this.data.icon);
					uni.showToast({
						title: '成功',
						icon: 'none'
					});
				},
				fail: () => {},
				complete: () => {}
			});
			uni.request({
				url: 'http://localhost:8090/freshmenapp/classmate/findone',
				method: 'POST',
				data: {id:1},
				success: res => {
					this.data1 = res.data.data 
					console.log(this.data.icon);
					uni.showToast({
						title: '成功',
						icon: 'none'
					});
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>

</style>
